
#include <dealers>

enum DRUGS {
	DRUGS_WEED,
	DRUGS_SPEED,
	DRUGS_ACID,
	DRUGS_CRACK,
	DRUGS_AMFETAMINE,
	DRUGS_HEROINE,
	DRUGS_COCAINE
}


/*	Registeres dealer with specified id
	@params:
		id - 		dealers id
		name - 		Dealers name
		refreshItems - 	should items be refreshed on round start
			Dra_Never - do not refresh
			Dra_OnLost - refresh if dealer has refreshItemsCount items or less
			Dra_Always - always refresh items
		refreshItemsCount - noumber of items when refresh will be called
		refreshDropOld - should dealer loose old items when refreshing
	
	@return:
		- id of dealer 
		- NO_DEALER if no mre dealers are allowed
		- NO_DEALER if dealer with this id was already registered
*/
native dd_register_dealer_by_id(id, const name[], DealerRefreshAction:refreshItems=Dealer_RefreshOnLost, refreshItemsCount=0,bool:refreshDropOld=false);

/*	Registeres dealer
	@params:
		name - 		Dealers name
		refreshItems - 	should items be refreshed on round start
			Dra_Never - do not refresh
			Dra_OnLost - refresh if dealer has refreshItemsCount items or less
			Dra_Always - always refresh items
		refreshItemsCount - noumber of items when refresh will be called
		refreshDropOld - should dealer loose old items when refreshing
	
	@return:
		id of dealer or NO_DEALER if no mre dealers are allowed
*/
native dd_register_dealer(const name[], DealerRefreshAction:refreshItems=Dealer_RefreshOnLost, refreshItemsCount=0,bool:refreshDropOld=false);

/* 	Sets dealers drug definition
	@params:
		dealer -	dealers id
		drug - 		drug
		minCount - 	minimum count of items
		maxCount - 	maximum count of items
		minChance - 	minimum chance dealer will have this item
		maxChance - 	maximum chance dealer will have this item
		minCost - 	minimum cost of item
		maxCost	- 	maximum cost of item
*/
native dd_set_dealer_item_def(dealer, DRUGS:drug, minCount, maxCount, minChance, maxChance, minCost, maxCost);

/*	Gets dealers count
*/
native dd_get_dealers_count();

/* 	Gives drugs to dealers
	@params:
		forceGive - 	if true items will be given always, else items will be given if
				dealer was registered with refreshItems = 2 or
				refreshItems = 1 and dealer has refreshItemsCount items or less
		forceClean - 	if true and items will be given - forces clearing items
			
*/		
native dd_give_items_to_dealers( bool:forceGive = false, bool:forceClean=false);

/* 	Gives drugs to dealer
	@params:
		dealer - 	dealers id
		forceGive - 	if true items will be given always, else items will be given if
				dealer was registered with refreshItems = 2 or
				refreshItems = 1 and dealer has refreshItemsCount items or less
		forceClean - 	if true and items will be given - forces clearing items
			
*/		
native dd_give_items_to_dealer(dealer, bool:forceGive = false, bool:forceClean=false);

/* 	Sets dealers drug count and cost. This can be changed if dealers drugs be refreshed
	@params:
		dealer - 	dealers id
		drug - 		drug
		bAdd - 		if true - dealers drug count will be increased, else it will be set to count value
		count - 	noumber of drugs
		cost - 		cost of drugs
*/
native dd_give_item_to_dealer(dealer, DRUGS:drug, bool:bAdd, count, cost);

/* 	Clears players dealers. After calling this method player will have no access to any dealer
	@params:
		id - 		players id
*/
native dd_clear_player_dealers(id);

/* 	Will grant access, for player, to specified dealers
	@params:
		id - 		id of player
		dealers - 	all dealers that player should have access to
		count - 	noumber of dealers
		clearOthers - 	if true player will loose access to other dealers
*/
native dd_set_player_dealers(id, const dealers[], count, bool: clearOthers=true);

/* 	Sets or removes acces to dealer
	@params:
		id -		players id
		dealer - 	dealers id
		set - 		true/fals - give/remove access
*/
native dd_set_player_dealer(id, dealer, bool:set);

/* 	Clears players dealers. After calling this method player will have no access to any drugs
	@params:
		id - 		players id
*/
native dd_clear_player_items(id);

/* 	Will grant access, for player, to specified drugs
	@params:
		id - 		id of player
		drugs - 	all drugs that player should have access to
		count - 	noumber of drugs
		clearOthers - 	if true player will loose access to other drugs
*/
native dd_set_player_items(id, const drugs[], count, bool: clearOthers=true);

/* 	Sets or removes acces to dealer
	@params:
		id -		players id
		drug - 		drug
		set - 		true/fals - give/remove access
*/
native dd_set_player_item(id, DRUGS:drug, bool:set);

/*	Shows dealer menu

*/
native dd_dealer_menu(id);

/*	Shows item menu

*/
native dd_item_menu(id);
/* 	Shows drugs you have so you can take some
	@params:
		id - 		players id
*/
native dd_take_drug_menu(id);

/*	Makes player take a drug if he has one
	@params:
		id - 		players id
		drug - 		drug
*/
native dd_take_drug(id, DRUG:drug);

/*	Gets drugs player currently has
	@params
		id - 		players id
		drugsCount - 	table of drugs
*/
native dd_get_user_drugs(id, drugsCount[DRUGS]);

/*	Gets user addicted points
	@params
		id - 		players id
*/
native dd_get_user_addicted_points(id);

/*	Gets user addicted status
	@params
		id - 		players id
*/
native bool:dd_get_user_addicted(id);

/*	Sets drugs player currently has
	@params
		id - 		players id
		drugsCount - 	table of drugs
		bAdd - 		should drugs count be added or set
*/
native dd_set_user_drugs(id, const drugsCount[DRUGS], bool:bAdd:false);

/*	Sets user addicted points
	@params
		id - 		players id
		points - 	addicted points
*/
native dd_set_user_addicted_points(id, points);

/*	Sets user addicted status
	@params
		id - 		players id
		addicted - 	addicted
*/
native bool:dd_set_user_addicted(id, bool:addicted);



